Spread Windows Forms 10.0 Product Documentation
Evaluate(Object[]) Method
Example 


Arguments for the function evaluation
Returns the result of the function applied to the arguments.
Syntax
'Declaration
 
Public Overloads MustOverride Function Evaluate( _
   ByVal args() As Object _
) As Object
'Usage
 
Dim instance As FunctionInfo
Dim args() As Object
Dim value As Object
 
value = instance.Evaluate(args)
public abstract object Evaluate( 
   object[] args
)

Parameters

args
Arguments for the function evaluation

Return Value

Object containing the result of the function applied to the arguments
Example
This example calculates a formula without adding the formula to the control.
fpSpread1.ActiveSheet.Cells[0, 0].Value = 5;
fpSpread1.ActiveSheet.Cells[0, 1].Value = 10;
fpSpread1.ActiveSheet.Cells[0, 2].Value = 7;

object a1 = fpSpread1.ActiveSheet.GetValue(0, 0);
object a2 = fpSpread1.ActiveSheet.GetValue(0, 1);
object a3 = fpSpread1.ActiveSheet.GetValue(0, 2);

object[] args = new object[] { a1, a2, a3 };
object result = FarPoint.CalcEngine.FunctionInfo.SumFunction.Evaluate(args);
MessageBox.Show(result.ToString());
FpSpread1.ActiveSheet.Cells(0, 0).Value = 5
FpSpread1.ActiveSheet.Cells(0, 1).Value = 10
FpSpread1.ActiveSheet.Cells(0, 2).Value = 7

Dim a1 As Object = FpSpread1.ActiveSheet.GetValue(0, 0)
Dim a2 As Object = FpSpread1.ActiveSheet.GetValue(0, 1)
Dim a3 As Object = FpSpread1.ActiveSheet.GetValue(0, 2)

Dim args As Object() = New Object() {a1, a2, a3}
Dim result As Object = FarPoint.CalcEngine.FunctionInfo.SumFunction.Evaluate(args)
MessageBox.Show(result.ToString())
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FunctionInfo Class
FunctionInfo Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.